package com.sh.工厂模式.工厂方法模式;

import com.sh.工厂模式.工厂方法模式.具体工厂.FighterFactory;
import com.sh.工厂模式.工厂方法模式.具体工厂.GunFactory;
import com.sh.工厂模式.工厂方法模式.抽象产品.Weapon;
import com.sh.工厂模式.工厂方法模式.抽象工厂.WeaponFactory;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description:
 */
public class Main {
    public static void main(String[] args) {
        WeaponFactory factory = new GunFactory();
        Weapon weapon = factory.get();
        weapon.attack();

        WeaponFactory factory1 = new FighterFactory();
        Weapon weapon1 = factory1.get();
        weapon1.attack();
    }
}

